package Static_Block;

public class Student {
    static int number = 80;
    static String schoolName;

    //静态代码块//可以用于初始化
    static {
        System.out.println("静态代码块执行了");
        schoolName = "hei,ma";
    }

    //实例代码块
    {
        System.out.println("实例代码块执行了");
    }


    //无参构造器
    public Student() {
        System.out.println("无参构造器执行了");
    }

    //有参构造器
    public Student(String name) {
        System.out.println("有参构造器执行了");
    }
}
